package com.molin.extensionTest.getFieldModel;

import java.lang.reflect.Method;

public class Demo3 {
    public static void main(String[] args) throws ClassNotFoundException, NoSuchMethodException {
        Class clazz = Class.forName("com.molin.extensionTest.getFieldModel.Student");
        Method sayHi = clazz.getDeclaredMethod("sayHi");
        System.out.println(sayHi);

        Method sayHiName = clazz.getDeclaredMethod("sayHi", String.class);
        System.out.println(sayHiName);
    }
}
